import request from '@/utils/request'

/*
 * 电子通知
 */

// 申请审核列表
export function purchaseIndex(params) {
  return request({
    url: 'purchase_workflow/index',
    method: 'GET',
    params
  })
}

export function purchaseDetailInfo(params) {
  return request({
    url: 'purchase/edit',
    method: 'GET',
    params
  })
}

//  申请审核添加
export function purchaseAdd(data) {
  return request({
    url: 'purchase_workflow/add',
    method: 'POST',
    data: data
  })
}

//  获取申请审核详情
export function purchaseDetail(params) {
  return request({
    url: 'purchase_workflow/edit',
    method: 'GET',
    params
  })
}

//   编辑申请审核模版
export function purchaseEdit(data) {
  return request({
    url: 'purchase_workflow/edit',
    method: 'POST',
    data: data
  })
}

//   删除申请审核模版
export function purchaseDelete(data) {
  return request({
    url: 'purchase_workflow/delete',
    method: 'POST',
    data: data
  })
}

//   删除申请审核模版
export function purchaseExport(data) {
  return request({
    url: 'purchase/export_now',
    method: 'POST',
    data: data
  })
}

// 删除我的申请 purchase/delete
export function purchaseMyDelete(data) {
  return request({
    url: 'purchase/delete',
    method: 'POST',
    data: data
  })
}

// 编辑申购单 purchase/edit
export function purchaseOrderEdit(data) {
  return request({
    url: 'purchase/edit',
    method: 'POST',
    data: data
  })
}
